home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
a_utils
/
perl
/
prlbkxmp.lha
/
ch2
/
yorn
< prev
Wrap
Text File
|
1991-01-07
|
207b
|
11 lines
#!/usr/bin/perl
sub y_or_n {
local($prompt) = @_;
print STDOUT $prompt;
local($answer) = scalar(<STDIN>);
$answer =~ /^y/i;
}
&walk if &y_or_n("I'd walk a camel for a mile. Would you? ");